﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="rs" uri="http://www.demo2do.com/taglib/core"%>
<!DOCTYPE html>
<html>
  <head>
  	
  	<%@ include file="/WEB-INF/include/meta.jsp" %>
  	<%@ include file="/WEB-INF/include/css.jsp" %>
	
	<title>众投湾</title>
	
	<fmt:setBundle basename="ApplicationMessage"/>
	<fmt:setLocale value="zh_CN"/>
	
  </head>

  <body>
  
	<%@ include file="/WEB-INF/include/header.jsp" %>
	<%@ include file="/WEB-INF/include/banner.jsp" %>
	
	<div class="container clearfix zz-startups">
	
	  <div class="zz-startups-header funding">
	    <div class="wrapper clearfix">
	      <h3 class="text-funding">正在合投</h3>
	      <a class="demo2do-radius-btn demo2do-radius-btn-danger pull-right" href="${ctx}/startups?tid=0&rid=0&fsid=3">浏览更多&nbsp;&nbsp;<i class="glyphicon glyphicon-play font-size-12"></i></a>
	    </div>
	  </div>
	  
	  <c:set var="hotStartup" value="${(redisCache['startup.funding'].values)[0]}" />
	  
	  <div class="col-lg-12 zz-large-startup">
	    <div class="zz-large-wrapper clearfix">
	    
	  	  <div class="startup-info">
	  	  
	  	    <div class="startup-profile">
	  	  	  <img class="zz-hot-ribbon" src="${ctx.resource}/img/hot-ribbon.png">
	  	  	
	  	  	  <img class="pull-left" src="${ctx.upload}/${hotStartup.profile.avatar}" width="100px">
	  	      <div class="startup-profile-content">
	  	  	    <h2 class="no-top-margin text-primary line-ellipsis"><a class="no-text-decoration" href="${ctx}/startups/${hotStartup.id}">${hotStartup.profile.name}&nbsp;<small class="font-size-14">${hotStartup.profile.alias}</small></a></h2>
	  	  	    <div class="font-size-12 box-ellipsis profile-description">${hotStartup.profile.description}</div>
	  	  	  </div>
	  	    </div>
	  	    
	  	    <div class="startup-fund">
	  	      <div class="progress zz-progress ${hotStartup.fund.fundedPercentage > 1 ? 'zz-overfunded-progress' : ''}">
	  	        <fmt:formatNumber value="${hotStartup.fund.fundedPercentage}" type="percent" /><c:if test="${startup.fund.fundedPercentage >= 1}">（合投成功）</c:if>
	          	<div class="progress-bar" style='width: <fmt:formatNumber value="${hotStartup.fund.fundedPercentage}" type="percent" />;'></div>
	  	      </div>
	  	      
	  	      <div class="fund-data-list text-muted">
	  	        <div class="pull-left"><b>&yen;</b>&nbsp;<b class="text-primary" title="已获认购"><fmt:formatNumber value="${hotStartup.fund.fundedSum}" type="number"/>万</b><br>已获认购</div>
	            <div class="pull-right text-align-right"><b>&yen;</b>&nbsp;<b class="text-primary" title="期望融资"><fmt:formatNumber value="${hotStartup.fund.total}" type="number" />万</b><br>期望融资</div>
	            <div><b title="剩余时间">${hotStartup.fund.remainingDays}天</b><br>剩余时间</div>
	  	      </div>
	  	    </div>
	  	    
	  	  </div><!-- startup info --> 
	  	  
	      <img class="pull-right" src="${ctx.upload}/${hotStartup.profile.poster}" width="468px" height="260px">
	      
	      <div class="startup-recommend-box">
	      	<h3 class="recommend-header">重点推荐</h3>
	      	<ul class="list-inline">
	      	  <c:forEach begin="1" end="${hotStartup.recommend.star}">
	      	    <li><i class="glyphicon glyphicon-star"></i></li>
	      	  </c:forEach>
	      	</ul>
	      	<p class="box-ellipsis recommend-content">${hotStartup.recommend.reason}</p>
	      </div>
	  	       
	    </div>
	  </div><!-- zz-large-startup -->
	  
	  <c:forEach var="startup" items="${redisCache['startup.funding'].values}" varStatus="counter">
	  	<c:if test="${counter.index != 0}">
	  	  
	  	  <div class="col-md-4 col-sm-6 zz-small-startup">
	    
	        <div class="startup-info">
	        
	          <div class="startup-profile">
	            <img class="pull-left" src="${ctx.upload}/${startup.profile.avatar}" width="80px">
	            <div class="startup-profile-content">
	              <h3 class="no-top-margin text-primary line-ellipsis"><a class="no-text-decoration" href="${ctx}/startups/${startup.id}">${startup.profile.name}&nbsp;<small class="font-size-14">${startup.profile.alias}</small></a></h3>
	              <div class="font-size-12 box-ellipsis profile-description text-deep-gray">${startup.profile.description}</div>
	            </div>
	          </div><!-- startup-profile -->
	          
	          <div class="startup-fund">
	            <div class="progress zz-progress ${startup.fund.fundedPercentage > 1 ? 'zz-overfunded-progress' : ''}">
	              <fmt:formatNumber value="${startup.fund.fundedPercentage}" type="percent" /><c:if test="${startup.fund.fundedPercentage >= 1}">（合投成功）</c:if>
	          	  <div class="progress-bar" style='width: <fmt:formatNumber value="${startup.fund.fundedPercentage}" type="percent" />;'></div>
	            </div>
	        
	            <div class="fund-data-list text-light-gray">
	              <div class="pull-left"><b>&yen;</b>&nbsp;<b class="text-primary" title="已获认购"><fmt:formatNumber value="${startup.fund.fundedSum}" type="number"/>万</b><br>已获认购</div>
	              <div class="pull-right text-align-right"><b>&yen;</b>&nbsp;<b class="text-primary" title="期望融资"><fmt:formatNumber value="${startup.fund.total}" type="number" />万</b><br>期望融资</div>
	              <div><b title="剩余时间">${startup.fund.remainingDays}天</b><br>剩余时间</div>
	            </div>
	          </div><!-- startup-fund -->
	          
	        </div><!-- startup-info -->
	    
	      </div><!-- zz-small-startup -->
	      
	  	</c:if>
	  </c:forEach>
	  
	</div>
	
	<div class="container clearfix zz-startups">
	
	  <div class="zz-startups-header prefunding">
	    <div class="wrapper clearfix">
	      <h3 class="text-prefunding">预热项目</h3>
	      <a class="demo2do-radius-btn demo2do-radius-btn-warning pull-right" href="${ctx}/startups?tid=0&rid=0&fsid=2">浏览更多&nbsp;&nbsp;<i class="glyphicon glyphicon-play font-size-12"></i></a>
	    </div>
	  </div>
	  
	  <c:forEach var="startup" items="${redisCache['startup.prefunding'].values}">
	    <div class="col-md-3 col-sm-6 col-xs-6 zz-small-startup">
	      <div class="startup-box">
	        
	        <div class="startup-poster">
	          <a href="${ctx}/startups/${startup.id}"><img src="${ctx.upload}/${startup.profile.poster}" width="100%"></a>
	          <div class="startup-name-wrapper">
	            <h3 class="line-ellipsis no-top-margin no-bottom-margin">
	              <a class="no-text-decoration text-orange" href="${ctx}/startups/${startup.id}"><b>${startup.profile.name}</b></a>
	            </h3>
	          </div>
	        </div>
	        
	        <div class="startup-basic">
	          <div class="startup-label"><p>
	            <span class="glyphicon glyphicon-map-marker" title="地区"></span>&nbsp;<b class="text-muted">${startup.profile.region}</b>&nbsp;&nbsp;&nbsp;&nbsp;
	            <span class="glyphicon glyphicon-tags" title="标签"></span>&nbsp;
	            <b class="text-muted" title="${startup.tags}">
	              <c:forEach var="tag" items="${fn:split(startup.tags, ',')}" varStatus="count">
	                <c:choose>
	                  <c:when test="${count.index == 0}">${tag}</c:when>
	                  <c:otherwise>&nbsp;·&nbsp;${tag}</c:otherwise>
	                </c:choose>
	              </c:forEach>
	            </b></p>
	          </div>
	          <div class="startup-data clearfix">
	            <div class="col-xs-4 pull-left"><b class="text-info" title="关注"><rs:redis key="${startup.fansCountKey}" type="int" /></b><br><span>关注</span></div>
	            <div class="col-xs-4 pull-right"><b class="text-info" title="查看"><rs:redis key="${startup.viewCountKey}" type="int" /></b><br><span>查看</span></div>
	            <div class="col-xs-4"><b class="text-info" title="约谈"><rs:redis key="${startup.meetCountKey}" type="int" /></b><br><span>约谈</span></div>
	          </div>
	        </div>
	        
	      </div>
	    </div>
	  </c:forEach>
	  
	</div>
	
	<div class="container clearfix zz-startups">
	
	  <div class="zz-startups-header latest">
	    <div class="wrapper clearfix">
	      <h3 class="text-latest">最新项目</h3>
	      <a class="demo2do-radius-btn demo2do-radius-btn-info pull-right" href="${ctx}/startups?tid=0&rid=0&fsid=1">浏览更多&nbsp;&nbsp;<i class="glyphicon glyphicon-play font-size-12"></i></a>
	    </div>
	  </div>
	  
	  <c:forEach var="startup" items="${redisCache['startup.latest'].values}">
	    <div class="col-md-3 col-sm-6 col-xs-6 zz-small-startup">
	      <div class="startup-box">
	        
	        <div class="startup-poster">
	          <a href="${ctx}/startups/${startup.id}"><img src="${ctx.upload}/${startup.profile.poster}" width="100%"></a>
	          <div class="startup-name-wrapper">
	            <h3 class="line-ellipsis no-top-margin no-bottom-margin">
	              <a class="no-text-decoration text-orange" href="${ctx}/startups/${startup.id}"><b>${startup.profile.name}</b></a>
	            </h3>
	          </div>
	        </div>
	        
	        <div class="startup-basic">
	          <div class="startup-label"><p>
	            <span class="glyphicon glyphicon-map-marker" title="地区"></span>&nbsp;<b class="text-muted">${startup.profile.region}</b>&nbsp;&nbsp;&nbsp;&nbsp;
	            <span class="glyphicon glyphicon-tags" title="标签"></span>&nbsp;
	            <b class="text-muted" title="${startup.tags}">
	              <c:forEach var="tag" items="${fn:split(startup.tags, ',')}" varStatus="count">
	                <c:choose>
	                  <c:when test="${count.index == 0}">${tag}</c:when>
	                  <c:otherwise>&nbsp;·&nbsp;${tag}</c:otherwise>
	                </c:choose>
	              </c:forEach>
	            </b></p>
	          </div>
	          <div class="startup-data clearfix">
	            <div class="col-xs-4 pull-left"><b class="text-info" title="关注"><rs:redis key="${startup.fansCountKey}" type="int" /></b><br><span>关注</span></div>
	            <div class="col-xs-4 pull-right"><b class="text-info" title="查看"><rs:redis key="${startup.viewCountKey}" type="int" /></b><br><span>查看</span></div>
	            <div class="col-xs-4"><b class="text-info" title="约谈"><rs:redis key="${startup.meetCountKey}" type="int" /></b><br><span>约谈</span></div>
	          </div>
	        </div>
	        
	      </div>
	    </div>
	  </c:forEach>
	
	</div>
	
	<%@ include file="/WEB-INF/include/footer.jsp" %>
	
	<%@ include file="/WEB-INF/include/script.jsp" %>
    
  </body>
  
</html>
